﻿local backdrop = {
   bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",  
   edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
   tile = true,
   tileSize = 32,
   edgeSize = 32,
   insets = {    left = 11,    right = 12,    top = 12,    bottom = 11
  }
}

Atlas_Wnet_MainFrame= CreateFrame("frame","Atlas_Wnet_MainFrame",UIParent)
Atlas_Wnet_MainFrame:SetPoint("top",0,0)
Atlas_Wnet_MainFrame:SetWidth(50)
Atlas_Wnet_MainFrame:SetHeight(50)
Atlas_Wnet_MainFrame:SetParent(UIParent)
Atlas_Wnet_MainFrame:Show()

Atlas_Wnet_MenuFrame = CreateFrame("Frame","Atlas_Wnet_MenuFrame",UIParent)
Atlas_Wnet_MenuFrame:SetFrameStrata("HIGH") 
Atlas_Wnet_MenuFrame:SetWidth(50)
Atlas_Wnet_MenuFrame:SetHeight(100)
Atlas_Wnet_MenuFrame:SetBackdrop(backdrop)
--Atlas_Wnet_MenuFrame:SetBackdropColor(1,0,0)
--Atlas_Wnet_MenuFrame:SetBackdropBorderColor(0,0.7,0.7)
Atlas_Wnet_MenuFrame:EnableMouse(true)
Atlas_Wnet_MenuFrame:SetMovable(true)
Atlas_Wnet_MenuFrame:RegisterForDrag("LeftButton")
Atlas_Wnet_MenuFrame:SetPoint("center",0,0)
Atlas_Wnet_MenuFrame:Show()

Atlas_Wnet_QuestBtn= CreateFrame("Button","Atlas_Wnet_QuestBtn",Atlas_Wnet_MenuFrame,"UIPanelButtonTemplate")
Atlas_Wnet_QuestBtn:SetPoint("top",0,-15)
Atlas_Wnet_QuestBtn:SetWidth(20)
Atlas_Wnet_QuestBtn:SetHeight(20)
Atlas_Wnet_QuestBtn:SetText("Q");
Atlas_Wnet_QuestBtn:SetParent(Atlas_Wnet_MenuFrame)
Atlas_Wnet_QuestBtn:Show()

Atlas_Wnet_SendRepBtn= CreateFrame("Button","Atlas_Wnet_QuestBtn",Atlas_Wnet_MenuFrame,"UIPanelButtonTemplate")
Atlas_Wnet_SendRepBtn:SetPoint("top",0,-40)
Atlas_Wnet_SendRepBtn:SetWidth(20)
Atlas_Wnet_SendRepBtn:SetHeight(20)
Atlas_Wnet_SendRepBtn:SetText("S");
Atlas_Wnet_SendRepBtn:SetParent(Atlas_Wnet_MenuFrame)
Atlas_Wnet_SendRepBtn:Disable()
Atlas_Wnet_SendRepBtn:Show()

Atlas_Wnet_WatchRepBtn= CreateFrame("Button","Atlas_Wnet_QuestBtn",Atlas_Wnet_MenuFrame,"UIPanelButtonTemplate")
Atlas_Wnet_WatchRepBtn:SetPoint("top",0,-65)
Atlas_Wnet_WatchRepBtn:SetWidth(20)
Atlas_Wnet_WatchRepBtn:SetHeight(20)
Atlas_Wnet_WatchRepBtn:SetText("W");
Atlas_Wnet_WatchRepBtn:SetParent(Atlas_Wnet_MenuFrame)
Atlas_Wnet_WatchRepBtn:Show()

Atlas_Wnet_ReportFrame = CreateFrame("Frame","Atlas_Wnet_ReportFrame ",Atlas_Wnet_MenuFrame)
Atlas_Wnet_ReportFrame :SetFrameStrata("HIGH") 
Atlas_Wnet_ReportFrame :SetWidth(150)
Atlas_Wnet_ReportFrame :SetHeight(300)
Atlas_Wnet_ReportFrame :SetBackdrop(backdrop)
--Atlas_Wnet_ReportFrame :SetBackdropColor(1,0,0)
--Atlas_Wnet_ReportFrame :SetBackdropBorderColor(0,0.7,0.7)
Atlas_Wnet_ReportFrame :EnableMouse(true)
Atlas_Wnet_ReportFrame :SetMovable(true)
Atlas_Wnet_ReportFrame :RegisterForDrag("LeftButton")
Atlas_Wnet_ReportFrame :SetPoint("center",-110,80)
Atlas_Wnet_ReportFrame :Hide()

Atlas_Wnet_label_={}

for i=1,10 do
	Atlas_Wnet_label_[i] = CreateFrame("Button", "Atlas_Wnet_label_"..i, Atlas_Wnet_ReportFrame)  
	Atlas_Wnet_label_[i]:SetWidth(100)
	Atlas_Wnet_label_[i]:SetHeight(20)
	Atlas_Wnet_label_[i].text=Atlas_Wnet_label_[i]:CreateFontString(nil,"OVERLAY","GameFontNormal")
	Atlas_Wnet_label_[i].text:SetAllPoints(Atlas_Wnet_label_[i])
	Atlas_Wnet_label_[i]:SetPoint("center",Atlas_Wnet_ReportFrame,"top",0,-10-i*20)
	Atlas_Wnet_label_[i].text:SetText("") 
	Atlas_Wnet_label_[i]:Disable();
	Atlas_Wnet_label_[i].text:SetVertexColor(0.9, 0.9, 0.0);
	
end

Atlas_Wnet_NextRepBtn= CreateFrame("Button","Atlas_Wnet_NextRepBtn",Atlas_Wnet_ReportFrame,"UIPanelButtonTemplate")
Atlas_Wnet_NextRepBtn:SetPoint("top",-10,-220)
Atlas_Wnet_NextRepBtn:SetWidth(20)
Atlas_Wnet_NextRepBtn:SetHeight(20)
Atlas_Wnet_NextRepBtn:SetText(">>");
Atlas_Wnet_NextRepBtn:SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_NextRepBtn:Show()

Atlas_Wnet_AskBtn= CreateFrame("Button","Atlas_Wnet_PrewRepBtn",Atlas_Wnet_ReportFrame,"UIPanelButtonTemplate")
Atlas_Wnet_AskBtn:SetPoint("top",-40,-220)
Atlas_Wnet_AskBtn:SetWidth(20)
Atlas_Wnet_AskBtn:SetHeight(20)
Atlas_Wnet_AskBtn:SetText("?");
Atlas_Wnet_AskBtn:SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_AskBtn:Show()

Atlas_Wnet_ClrRepBtn= CreateFrame("Button","Atlas_Wnet_ClrRepBtn",Atlas_Wnet_ReportFrame,"UIPanelButtonTemplate")
Atlas_Wnet_ClrRepBtn:SetPoint("top",30,-220)
Atlas_Wnet_ClrRepBtn:SetWidth(40)
Atlas_Wnet_ClrRepBtn:SetHeight(20)
Atlas_Wnet_ClrRepBtn:SetText("Clr");
Atlas_Wnet_ClrRepBtn:SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_ClrRepBtn:Show()

Atlas_Wnet_CloseRepBtn= CreateFrame("Button","Atlas_Wnet_CloseRepBtn",Atlas_Wnet_ReportFrame,"UIPanelButtonTemplate")
Atlas_Wnet_CloseRepBtn:SetPoint("top",55,-15)
Atlas_Wnet_CloseRepBtn:SetWidth(10)
Atlas_Wnet_CloseRepBtn:SetHeight(10)
Atlas_Wnet_CloseRepBtn:SetText("X");
Atlas_Wnet_CloseRepBtn:SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_CloseRepBtn:Show()

Atlas_Wnet_EditBox1 = CreateFrame("EditBox", "Atlas_Wnet_EditBox1", Atlas_Wnet_ReportFrame, "InputBoxTemplate")
Atlas_Wnet_EditBox1 :SetAutoFocus(false)
Atlas_Wnet_EditBox1 :SetFontObject(ChatFontSmall)
Atlas_Wnet_EditBox1 :SetTextInsets(0, 0, 3, 3)
Atlas_Wnet_EditBox1 :SetMaxLetters(255)
Atlas_Wnet_EditBox1 :SetPoint("top",2,-270)
Atlas_Wnet_EditBox1 :SetText("Репорт")
Atlas_Wnet_EditBox1 :SetHeight(10)
Atlas_Wnet_EditBox1 :SetWidth(107)
Atlas_Wnet_EditBox1 :SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_EditBox1 :Show()

Atlas_Wnet_EditBox2 = CreateFrame("EditBox", "Atlas_Wnet_EditBox2", Atlas_Wnet_ReportFrame, "InputBoxTemplate")
Atlas_Wnet_EditBox2 :SetAutoFocus(false)
Atlas_Wnet_EditBox2 :SetFontObject(ChatFontSmall)
Atlas_Wnet_EditBox2 :SetTextInsets(0, 0, 3, 3)
Atlas_Wnet_EditBox2 :SetMaxLetters(255)
Atlas_Wnet_EditBox2 :SetPoint("top",20,-247)
Atlas_Wnet_EditBox2 :SetText("Название")
Atlas_Wnet_EditBox2 :SetHeight(10)
Atlas_Wnet_EditBox2 :SetWidth(70)
Atlas_Wnet_EditBox2 :SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_EditBox2 :Show()

Atlas_Wnet_AddNewRepBtn= CreateFrame("Button","Atlas_Wnet_AddNewRepBtn",Atlas_Wnet_ReportFrame,"UIPanelButtonTemplate")
Atlas_Wnet_AddNewRepBtn:SetPoint("top",-40,-243)
Atlas_Wnet_AddNewRepBtn:SetWidth(30)
Atlas_Wnet_AddNewRepBtn:SetHeight(20)
Atlas_Wnet_AddNewRepBtn:SetText("Add");
Atlas_Wnet_AddNewRepBtn:SetParent(Atlas_Wnet_ReportFrame)
Atlas_Wnet_AddNewRepBtn:Show()

Atlas_Wnet_Help = {}
for i=1,4 do
	Atlas_Wnet_Help[i]= CreateFrame("Button","Atlas_Wnet_Help"..i,Atlas_Wnet_MenuFrame,"UIPanelButtonTemplate")
	Atlas_Wnet_Help[i]:SetPoint("top",20,i*(-10))
	Atlas_Wnet_Help[i]:SetWidth(10)
	Atlas_Wnet_Help[i]:SetHeight(10)
	Atlas_Wnet_Help[i]:SetText("");
	Atlas_Wnet_Help[i]:SetParent(Atlas_Wnet_MenuFrame)
	Atlas_Wnet_Help[i]:Show()
end
